/*
 * @Descripttion: 通知
 * @version: 
 * @Author: whw
 * @Date: 2021-11-23
 * @LastEditors: whw
 * @LastEditTime: 2021-11-23
 */
export const widgetNotification = {
  code: 'widget-notification',
  type: 'chart',
  label: '通知(开发中)',
  icon: 'iconicon_tubiao_bingtu',
  options: {
    // 配置
    setup: [
      {
        type: 'el-input-text',
        label: '图层名称',
        name: 'layerName',
        required: false,
        placeholder: '',
        value: '通知',
      },
      {
        type: 'el-input-text',
        label: '通知标题',
        name: 'title',
        required: false,
        placeholder: '',
        value: ''
      },
      {
        type: 'el-input-number',
        label: '停留时间',
        name: 'duration',
        required: false,
        placeholder: '单位 (ms)',
        value: 4500
      },
      {
        type: 'el-input-text',
        label: '位置',
        name: 'position',
        required: false,
        placeholder: 'top-right/top-left/bottom-right/bottom-left',
        value: 'top-right'
      },
    ],
    // 数据
    data: [
      {
        type: 'el-radio-group',
        label: '数据类型',
        name: 'dataType',
        require: false,
        placeholder: '',
        selectValue: true,
        selectOptions: [
          {
            code: 'staticData',
            name: '静态数据',
          },
          {
            code: 'dynamicData',
            name: '动态数据',
          },
        ],
        value: 'staticData',
      },
      {
        type: 'el-input-number',
        label: '刷新时间(毫秒)',
        name: 'refreshTime',
        relactiveDom: 'dataType',
        relactiveDomValue: 'dynamicData',
        value: 5000
      },
      {
        type: 'el-button',
        label: '静态数据',
        name: 'staticData',
        required: false,
        placeholder: '',
        relactiveDom: 'dataType',
        relactiveDomValue: 'staticData',
        value: []
      },
      {
        type: 'dycustComponents',
        label: '',
        name: 'dynamicData',
        required: false,
        placeholder: '',
        relactiveDom: 'dataType',
        chartType: 'widget-scatter',
        relactiveDomValue: 'dynamicData',
        fieldOption: [{ name: '标题', code: 'title' }, { name: '内容', code: 'message' }, { name: '类型', code: 'type' }],
        value: '',
      },
    ],
    // 坐标
    position: [
      {
        type: 'el-input-number',
        label: '左边距',
        name: 'left',
        required: false,
        placeholder: '',
        value: 0,
      },
      {
        type: 'el-input-number',
        label: '上边距',
        name: 'top',
        required: false,
        placeholder: '',
        value: 0,
      },
      {
        type: 'el-input-number',
        label: '宽度',
        name: 'width',
        required: false,
        placeholder: '该容器在1920px大屏中的宽度',
        value: 100,
      },
      {
        type: 'el-input-number',
        label: '高度',
        name: 'height',
        required: false,
        placeholder: '该容器在1080px大屏中的高度',
        value: 100,
      },
    ],
  }
}
